<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
 * ("License"); You may not use this file except in compliance with the License
 * The Original Code is:  vtiger CRM Open Source
 * The Initial Developer of the Original Code is vtiger.
 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
*
 ********************************************************************************/
?>
	<div class="left">
      <input align="left" class="crmbutton small cancel"type="button" value="<?php echo getTranslatedString('LBL_BACK_BUTTON');?>" onclick="window.history.back();"/>
	</div>
	</form>
</div><!-- End action -->
<?php
global $result;
global $client;
global $Server_Path;

echo '<table class="list">' . "\n";

$customerid = $_SESSION['customer_id'];
$sessionid = $_SESSION['customer_sessionid'];

if($id != '') {
	//Get the Basic Information
	$block = "Invoice";
	$params = array('id' => "$id", 'block'=>"$block", 'contactid'=>"$customerid",'sessionid'=>"$sessionid");
	$result = $client->call('get_invoice_detail', $params, $Server_Path, $Server_Path);
	// Check for Authorization
	if (count($result) == 1 && $result[0] == "#NOT AUTHORIZED#") {
		echo '<tr><td class="error">' . getTranslatedString('LBL_NOT_AUTHORISED') . '</td></tr>' ."\n";
		echo '</table>' . "\n";
		include("bottom.php");
		die();
	}
	$invinfo = $result[0][$block];

	echo getblock_fieldlist($invinfo);
	
	echo '</table>' . "\n";	
}

?>